#include <stdio.h>
const char *name;

void xmalloc_set_program_name(const char *name,char *end)
{
  
}
#define IS_IDR_SEPARATOR(c) ((c) == '/'||(c) == '\\')

int main(int argc,char **argv)
{
  const char *p = "\/usr\/gcc";
  char* end = p + strlen(p);
  while(!IS_IDR_SEPARATOR(end[ -1]))
    {
      --end;
    }
  printf("%s\n",end);

  xmalloc_set_program_name(name,end);
  return 0;
}
